const promise1 = new Promise((resolve, reject) => {
    setTimeout(() => {   // 宏1
        resolve('success');  // 改状态
    }, 1000);
});

const promise2 = promise1.then(() => {   // 微1
    throw new Error('error!!!');
});

console.log('promise1', promise1);
console.log('promise2', promise2);

setTimeout(() => {  // 宏2
    console.log('promise1', promise1);
    console.log('promise2', promise2);
}, 2000);

// 'promise1' Promise{<pending>} -> promise2 Promise{<pending>} -> Error: error!!! 
// throw error 后面的不会执行
//( -> 'promise1' Promise{<resolved>: 'success'} -> 'promise2' Promise{<rejected>: 'error'})